@import '../styles/themes.scss';

.bmi-calculator {
  padding: 20px;
  background-color: var(--bg-color);
  min-height: 100vh;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', sans-serif;
}

/* 通用标题样式 */
.page-title-container {
  margin-bottom: 20px;
  text-align: center;
}

.page-title {
  font-size: 28px;
  font-weight: bold;
  color: var(--text-primary-color);
  display: inline-block;
  margin-bottom: 8px;
}

.title-underline {
  height: 2px;
  width: 100px;
  background-color: var(--primary-color);
  margin: 0 auto;
}

/* 输入表单样式 */
.input-form {
  background-color: var(--card-bg-color);
  border-radius: 16px;
  padding: 20px;
  box-shadow: var(--card-shadow);
}

.gender-section {
  margin-bottom: 20px;
}

.section-label {
  font-size: 24px;
  font-weight: 500;
  margin-bottom: 12px;
  display: block;
  color: var(--text-primary-color);
}

.gender-buttons {
  display: flex;
  justify-content: center;
  gap: 40px;
}

.gender-button {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: var(--secondary-color);
  color: var(--text-primary-color);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
}

.gender-text {
  font-size: 24px;
  font-weight: bold;
}

.gender-button.active {
  background-color: var(--primary-color);
  color: white;
  transform: scale(1.1);
}

.input-fields {
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
  margin-bottom: 20px;
}

.input-field-container {
  flex: 1;
  min-width: 90px;
}

.input-field {
  width: 100%;
  height: 50px;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 0 12px;
  font-size: 24px;
  background-color: var(--bg-color);
  margin-bottom: 5px;
}

.input-range {
  font-size: 24px;
  color: var(--text-secondary-color);
  display: block;
  text-align: center;
}

/* 实时预览 */
.realtime-preview {
  margin: 40px 0;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.bmi-circle-container {
  width: 140px;
  height: 140px;
  position: relative;
  margin-bottom: 10px;
}

.bmi-circle {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  padding: 8px;
}

.bmi-circle-inner {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background-color: var(--card-bg-color);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  box-shadow: inset 0 0 8px rgba(0, 0, 0, 0.1);
}

.bmi-value {
  font-size: 36px;
  font-weight: bold;
  color: var(--text-primary-color);
}

.bmi-label {
  font-size: 24px;
  color: var(--text-secondary-color);
}

.bmi-status {
  margin-top: 20px;
  font-size: 26px;
  font-weight: bold;
  margin-bottom: 10px;
  color: var(--primary-color);
}

.bmi-reference {
  font-size: 24px;
  color: var(--text-secondary-color);
}

/* 计算按钮 */
.calculate-btn {
  width: 100%;
  height: 50px;
  border-radius: 8px;
  font-size: 24px;
  font-weight: bold;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--button-bg);
  color: white;
  border: none;
  margin: 15px 0;
  box-shadow: 0 4px 12px rgba(46, 204, 113, 0.3);
  transition: all 0.3s ease;
}

.calculate-btn:active {
  opacity: 0.9;
  transform: translateY(2px);
  box-shadow: 0 2px 6px rgba(46, 204, 113, 0.3);
}

/* 广告空间 */
.ad-space {
  height: 50px;
  margin-top: 20px;
}

/* 结果页面样式 */
.results-section {
  background-color: transparent;
}

.bmi-result-circle-container {
  width: 200px;
  height: 200px;
  position: relative;
  margin: 20px auto;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.bmi-result-circle {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  padding: 10px;
}

.bmi-result-circle-inner {
  width: 100%;
  height: 200px;
  border-radius: 50%;
  background-color: var(--card-bg-color);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.1);
}

.bmi-result-value {
  font-size: 48px;
  font-weight: bold;
  color: var(--text-primary-color);
}

.bmi-result-label {
  font-size: 24px;
  color: var(--text-secondary-color);
}

.bmi-result-status {
  font-size: 28px;
  font-weight: bold;
  margin-top: 20px;
  color: var(--primary-color);
}

/* BMI分类条 */
.bmi-classification {
  margin: 100px 0;
  padding: 0 10px;
}

.classification-bar {
  display: flex;
  height: 16px;
  border-radius: 8px;
  overflow: hidden;
  margin-bottom: 8px;
}

.segment {
  height: 100%;
  transition: opacity 0.3s ease;
}

.segment.active {
  opacity: 1;
  box-shadow: 0 0 0 2px white, 0 0 0 4px currentColor;
  z-index: 1;
}

.segment:not(.active) {
  opacity: 0.7;
}

.classification-labels {
  display: flex;
  width: 100%;
}

.label {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.label .value {
  font-size: 24px;
  color: #666;
  margin-bottom: 4px;
}

.label .status {
  font-size: 24px;
  font-weight: 500;
  color: #333;
}

/* 指标卡片 */
.metrics-cards {
  display: flex;
  flex-direction: column;
  gap: 15px;
  margin-bottom: 30px;
}

.metric-card {
  background-color: white;
  border-radius: 12px;
  padding: 15px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
  line-height: 1.5;
}

.metric-title {
  font-size: 24px;
  color: #666;
  margin-bottom: 15px;
  line-height: 1.4;
}

.metric-content {
  display: flex;
  align-items: baseline;
  margin-bottom: 10px;
}

.metric-value {
  font-size: 36px;
  font-weight: bold;
  color: #333;
  margin-right: 8px;
  line-height: 1.3;
}

.metric-unit {
  font-size: 24px;
  color: #666;
  line-height: 1.4;
}

.metric-status {
  padding: 6px 12px;
  border-radius: 20px;
  color: white;
  font-size: 24px;
  margin-left: auto;
  font-weight: 600;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.metric-description {
  font-size: 24px;
  color: #888;
  line-height: 1.4;
  margin-top: 5px;
}

/* 健身建议 */
.advice-container {
  background-color: white;
  border-radius: 12px;
  padding: 25px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
  margin-bottom: 25px;
}

.advice-title {
  font-size: 26px;
  font-weight: bold;
  color: #333;
  margin-bottom: 15px;
}

.advice-description {
  font-size: 24px;
  color: #666;
  margin-bottom: 25px;
  line-height: 1.6;
}

.advice-section {
  margin-bottom: 25px;
  border: 1px solid #eee;
  border-radius: 8px;
  overflow: hidden;
}

.advice-section:last-child {
  margin-bottom: 0;
}

.advice-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px;
  background-color: #f5f7fa;
  cursor: pointer;
}

.advice-header .title {
  font-size: 24px;
  font-weight: 500;
  color: #333;
}

.advice-content {
  padding: 20px;
}

.advice-item {
  display: flex;
  margin-bottom: 18px;
  position: relative;
}

.advice-item:last-child {
  margin-bottom: 0;
}

.item-number {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background-color: #2ecc71;
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  font-weight: bold;
  margin-right: 15px;
  flex-shrink: 0;
}

.item-subtitle {
  font-weight: bold;
  color: #333;
  margin-right: 10px;
  flex-shrink: 0;
  font-size: 24px;
}

.item-text {
  font-size: 24px;
  color: #555;
  line-height: 1.6;
  flex: 1;
}

.show-more {
  display: block;
  text-align: center;
  color: #2ecc71;
  font-size: 24px;
  margin-top: 10px;
  cursor: pointer;
}

/* 返回按钮 */
.back-btn {
  width: 100%;
  height: 50px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  font-weight: 500;
  background-color: #95a5a6;
  color: white;
  border: none;
  margin-top: 20px;
  transition: all 0.3s ease;
}

.back-btn:active {
  background-color: #7f8c8d;
  transform: translateY(2px);
}

/* 响应式调整 */
@media (min-width: 768px) {
  .metrics-cards {
    flex-direction: row;
  }

  .metric-card {
    flex: 1;
  }
}

/* 分享按钮 */
.share-button {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background-color: #2ecc71;
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  position: fixed;
  right: 20px;
  top: 50%;
  transform: translateY(-50%);
  box-shadow: 0 4px 12px rgba(46, 204, 113, 0.4);
  z-index: 10;
}

.share-text {
  position: absolute;
  font-size: 24px;
  white-space: nowrap;
  bottom: -30px;
  left: 50%;
  transform: translateX(-50%);
  color: #333;
}
